package cn.bone.ou.user.mapper;

import cn.bone.ou.user.bean.User;
import cn.bone.ou.user.dto.UserDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {

    List<UserDto.ListDto> list(@Param("communityId")Integer communityId,
                               @Param("start")Integer start,
                               @Param("num")Integer num,
                               @Param("name")String name,
                               @Param("userType")Integer userType,
                               @Param("usable")Integer usable);

    int countList(@Param("communityId")Integer communityId,
                  @Param("name")String name,
                  @Param("userType")Integer userType,
                  @Param("usable")Integer usable);

    List<User> listByHouseId(@Param("houseId")Integer houseId);

    User getByPhoneNumAndCommunityId(@Param("communityId")Integer communityId,
                                     @Param("phoneNum")String phoneNum);

    /**获取小区业主总数*/
    int countYz(@Param("communityId")Integer communityId);

    /**获取业主总数*/
    int countAllYz(@Param("communityId")Integer communityId);
    /**获取住户总数*/
    int countAllZh(@Param("communityId")Integer communityId);
}
